// Paint
var NewComponent = null
// init
NewComponent = Qt.createComponent("New.qml")
checkComponent(NewComponent)

function checkComponent(component) {
    function componentLoaded() {
        if (component.status !== Component.Ready) {
            console.error(
                        "(" + component.status + ")  Failed to load " + component.url + " : " + component.errorString(
                            ))
        }
    }
    if (component.status === Component.Loading)
        component.statusChanged.connect(componentLoaded)
    else
        componentLoaded()
}

function newPost() {
    NewComponent.createObject(mainRoot, {
                                  "anchors.fill": mainRoot
                              })
}
